package com.welsy.iter.vo.iter
{
	import mx.core.UIComponent;	
	import flash.media.SoundTransform;
	
	public class DisplayVideo extends UIComponent
	{
		public var _videoURL:String;
		public var se:StreamingVideo;
				
		public function set videoURL(v:String):void
        {
            _videoURL = v;
            se = new StreamingVideo(_videoURL);
            se.StartStream();
            trace("play video");  
            changeVolume();             
            se.width= 560; 
            se.height= 400;
            se.x=this.width/2 - 280;
            se.y=this.height/2 - 200;
			this.addChild(se);  
												        		
        }
        
        public function set videoURLTest(v:String):void
        {
            _videoURL = v;
            se = new StreamingVideo(_videoURL);
            se.StartStream();
            trace("play video");  
            changeVolume();             
            se.width= 280; 
            se.height= 200;
            se.x=this.width/2 - 140;
            se.y=this.height/2 - 100;
			this.addChild(se);  
												        		
        }
        
        public function changeVolume():void {
        	if (se.stream != null) {
        		var transform:SoundTransform = se.stream.soundTransform;
           		transform.volume = mx.core.Application.application.soundVolume;
            	se.stream.soundTransform = transform; 
            	trace("volume " + mx.core.Application.application.soundVolume)
        	}         	     
        }        
	
	}
}